<!-- resources/rawfile/index.html -->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>WebView测试页</title>
    <style>
        #targetElement {
          color: blue;
          font-size: 20px;
          margin: 20px;
          padding: 10px;
          border: 1px solid #ccc;
        }
    </style>
</head>
<body>
<div id="targetElement">这是要获取的元素内容</div>
<button id="testButton" onclick="handleClick()">测试按钮</button>

<script>
    function handleClick() {
      // 调用鸿蒙侧的方法
      if (window.harmony && window.harmony.callHandler) {
        window.harmony.callHandler('buttonClicked', { message: '按钮被点击了' });
      }
    }
</script>
</body>
</html>